<template>
    <fieldset>
        <legend><h1>页面四</h1></legend>
        <ul>
            <h3>学生分数</h3>
            <li v-for="(item,i) in stuScore">
                <span>{{item.stuName}}</span>_________________
                <span>{{item.score}}</span>
            </li>
        </ul>
        <button @click="luckStudent">点击</button>
    </fieldset>
</template>

<script>
    import {mapActions, mapState} from "vuex";

    export default {
        name: "PageFour",
        data:()=>{
            return{
            }
        },
        computed:{

            ...mapState({
                stuScore:"stuScore"
            }),
        },
        methods:{
            luckStudent(){
              // this.$store.dispatch
            },
        ...mapActions(["luckStudent"])
        }

    }
</script>

<style scoped>

</style>